package com.bt.dmdb.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "ODS_PROJECT_CONTACTS")
@SuppressWarnings("serial")
public class ProjectContact implements java.io.Serializable {

    private long id;
    private Project project;
    private String name;
    private String email;
    private String phone;
    private String type;
    private Long ein;
    private Character primaryFlag;

    public ProjectContact() {
    }

    public ProjectContact(long id) {
        this.id = id;
    }

    public ProjectContact(long id, Project project, String name, String email, String phone, String type, Long ein, Character primaryFlag) {
        this.id = id;
        this.project = project;
        this.name = name;
        this.email = email;
        this.phone = phone;
        this.type = type;
        this.ein = ein;
        this.primaryFlag = primaryFlag;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false, precision = 10, scale = 0)
    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "PROJECT_ID")
    public Project getProject() {
        return this.project;
    }

    public void setProject(Project project) {
        this.project = project;
    }

    @Column(name = "NAME", length = 50)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "EMAIL", length = 50)
    public String getEmail() {
        return this.email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Column(name = "PHONE", length = 20)
    public String getPhone() {
        return this.phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Column(name = "TYPE", length = 50)
    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Column(name = "EIN", precision = 10, scale = 0)
    public Long getEin() {
        return this.ein;
    }

    public void setEin(Long ein) {
        this.ein = ein;
    }

    @Column(name = "PRIMARY_FLAG", length = 1)
    public Character getPrimaryFlag() {
        return this.primaryFlag;
    }

    public void setPrimaryFlag(Character primaryFlag) {
        this.primaryFlag = primaryFlag;
    }
}
